/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.src.ptit.javatraining.huynh.btvn1;

import java.util.Scanner;

/**
 *
 * @author user
 */
public class Baitap1 {
  public static boolean isPrime(long n) {
        if (n < 2) {
            return false;
        }
        long k = (long) Math.sqrt(n);
        for (long i = 2; i <= k; i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }

  @SuppressWarnings("empty-statement")
    public static void main(String[] args) {
        long n;
        Scanner sc = new Scanner(System.in);
        try{
        n = sc.nextLong();
        if (isPrime(n) == false) {
            System.out.println(n + " không phải số nguyên tố. ");
        } else {
            System.out.println(n + " là số nguyên tố .");
        }
    } catch(Exception e){
            System.out.println("Moi nhap lai");
    }
  }
}
